package com.learning.spring.aop.advice.before;

import com.learning.spring.aop.advice.monitor.AopMonitor;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * ClassName: AopBeforeAdvice
 * Description: 前置 Advice
 * Date: 2019/4/21 15:40 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public class AopBeforeAdvice implements MethodBeforeAdvice {

    /**
     * 方法前置增强
     *
     * @param method 目标类的方法
     * @param args   目标类方法的入参
     * @param target 目标类实例
     * @throws Throwable
     */
    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        // Advice 切入
        AopMonitor.start();
    }
}